package com.wkbb.basic.model;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.enums.RelationTypeEnum;
import com.wkbb.common.utils.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 家长表
 * b_family
 * @author Lxc
 * @date 2019-07-01 13:57:32
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class Family implements Serializable {
    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    private Long id;

    /**
     * 组织ID
     */
    @ApiModelProperty(value = "组织ID")
    private Long orgId;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    /**
     * 年级
     */
    @ApiModelProperty(value = "年级")
    private Long gradeId;

    /**
     * 班级
     */
    @ApiModelProperty(value = "班级")
    private Long classId;
    /**
     * 手机
     */
    @ApiModelProperty(value = "手机")
    private String mobile;

    /**
     * 卡号
     */
    @ApiModelProperty(value = "卡号")
    private String cardNo;

    /**
     * 学生用户ID
     */
    @ApiModelProperty(value = "学生用户ID")
    private Long studentUserId;
    /**
     * 学生
     */
    private String studentUserName;

    /**
     * s关系类型(1爸爸 2妈妈 3爷爷4奶奶 5姥爷 6姥姥7亲友 8其他)
     */
    @ApiModelProperty(value = "关系类型(1爸爸 2妈妈 3爷爷4奶奶 5姥爷 6姥姥7亲友 8其他)")
    private Integer relationType;
    @ApiModelProperty(value = "称呼")
    private String relationTypeName;
    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "显示通讯录（0否 1是）")
    private Boolean showAddressBook;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private Boolean status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private String updateBy;
	
	private Long oldUserId;

    /**
     * 智慧校园用户ID
     */
    @ApiModelProperty(value = "智慧校园用户ID")
    private String smartUserId;

    @ApiModelProperty(value = "人脸开关 0：关闭 1：开启 默认关闭")
    private Boolean faceFlag;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    public String getRelationTypeName() {
        if(StringUtil.isNotEmpty(relationTypeName)){
            return relationTypeName;
        }else {
            if (relationType == null) {
                return null;
            }
            return RelationTypeEnum.getDesc(this.relationType);
        }
    }
}